package com.project.web.wechat.service.impl.app;

import com.project.web.course.service.impl.common.BaseServiceImpl;
import com.project.web.wechat.mapper.app.WxBizAppConfigMapper;
import com.project.web.wechat.model.app.WxBizAppConfig;
import com.project.web.wechat.service.app.WxBizAppConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 企业微信应用配置业务实现类
 *
 * @author wyy
 * @date 2020-06-24
 */
@Service("wxBizAppConfigServiceImpl")
public class WxBizAppConfigServiceImpl extends BaseServiceImpl<WxBizAppConfig, Long> implements WxBizAppConfigService {

    @Autowired
    private WxBizAppConfigMapper wxBizAppConfigMapper;

    /**
     * 根据企业微信id及应用ID查询企业微信应用
     *
     * @param wxBizConfigId 企业微信ID
     * @param agentId       应用ID
     * @return
     */
    @Override
    public WxBizAppConfig getByAgentId(Long wxBizConfigId, String agentId) {
        return wxBizAppConfigMapper.getByAgentId(wxBizConfigId, agentId);
    }
}
